<%= javascript_include_tag :defaults %>
<%= javascript_include_tag('/my_admin/my_admin') %>

<%= stylesheet_link_tag('/my_admin/my_admin') %>

<script language="JavaScript">
<!--
model = "<%= @klass.to_s %>";
//-->
</script>

<body onload="go('<%= @klass.to_s %>')">

  <%= render :partial => 'my_admin/main/ajax' %>
  <h1>Spying <%= @klass_name + 's' %></h1>

  <table cellspacing="2" cellpadding="2" id="spy-list">
    <% for m in @models %>
      <tr class="<%= cycle('even', 'odd'); %>" id="m-<%= m.id %>">
      <% for column in @klass.columns %>
        <% if column.type == :datetime %>
        <td><%= nice_print(m.send(column.name)) %></td>
        <% else %>
          <td><%=h m.send(column.name) %></td>
        <% end %>
      <% end %>
      </tr>
    <% end %>
  </table>

</body>